<?php
namespace Forms\Validator;

use Pinenut\Form\Validator;

class DigitsAction extends Validator
{
	protected $defaultErrorMessage = 'Not a digit';
	
	protected function isValid($value, $params)
	{
		return $value === preg_replace('/[^\.0-9]/', '', (string)$value);
	}
}
